﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Error : GenericPage
{
    string sUrlOrigen = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            SetearCultura();
            SetearConexion();
            // Mostrar la Excepcion: mensaje formateado en sError
            string sError = System.Convert.ToString(Session["Error"]);
            sUrlOrigen = System.Convert.ToString(Session[sUrlOrigen]);
            txtError.Text = sError;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    protected void Volver_Click(object sender, EventArgs e)
    {
        try
        {
            //// Volver a la interfaz de origen donde se produjo la excepcion
            //string UrlOrigen = Convert.ToString(Session["UrlOrigen"]);
            //Response.Redirect(UrlOrigen, false);
            Response.Redirect("~/Seguridad/Default.aspx", false);
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
           // sUrlOrigen = null;
            //Session.Clear();
        }
    }
}
